<template>
  <el-row>
    <el-button
      type="info"
      v-for="item in btnText"
      :key="item.id"
      :index="item.id"
      @click="jumpToChild(item.url)"
    >
      {{ item.textName }}</el-button
    >
  </el-row>
</template>

<script>
export default {
  name: "GRButton",
  data() {
    return {};
  },
  props: {
    btnText: Array,
  },
  methods: {
    jumpToChild(url) {
      if (url) {
        this.$router.push(url);
      } else {
        this.$emit('reshow')
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.el-button--info {
  color: #fff;
  background-color: #6c7279;
  border-color: #6c7279;
}
</style>